package com.ruoyi.surfacewater.service.impl;

import com.ruoyi.common.utils.uuid.UUID;
import com.ruoyi.surfacewater.domain.BusDataAnalysisReport;
import com.ruoyi.surfacewater.domain.ReportVo;
import com.ruoyi.surfacewater.mapper.ReportDataMapper;
import com.ruoyi.surfacewater.service.ReportDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReportDataServiceImpl implements ReportDataService {

    @Autowired
    private ReportDataMapper reportDataMapper;

    @Override
    public BusDataAnalysisReport selectBusDataAnalysisReportById(String id)
    {
        return reportDataMapper.selectBusDataAnalysisReportById(id);
    }

    @Override
    public List<BusDataAnalysisReport> selectBusDataAnalysisReportList(ReportVo vo) {
        return reportDataMapper.selectBusDataAnalysisReportList(vo);
    }

    @Override
    public int insertBusDataAnalysisReport(BusDataAnalysisReport busDataAnalysisReport) {
        busDataAnalysisReport.setId(UUID.randomUUID().toString());
        return reportDataMapper.insertBusDataAnalysisReport(busDataAnalysisReport);
    }
    /**
     * 修改报告单数据（自动日报和周报以及手工月报）
     *
     * @param busDataAnalysisReport 报告单数据（自动日报和周报以及手工月报）
     * @return 结果
     */
    @Override
    public int updateBusDataAnalysisReport(BusDataAnalysisReport busDataAnalysisReport)
    {

        return reportDataMapper.updateBusDataAnalysisReport(busDataAnalysisReport);
    }

    /**
     * 批量删除报告单数据（自动日报和周报以及手工月报）
     *
     * @param ids 需要删除的报告单数据（自动日报和周报以及手工月报）主键
     * @return 结果
     */
    @Override
    public int deleteBusDataAnalysisReportByIds(String[] ids)
    {
        return reportDataMapper.deleteBusDataAnalysisReportByIds(ids);
    }


}
